package com.acme.exceptions;

public class OverDraftLimitExceededException extends BankException {
	private String message;
	private double balance;
	private double overdraft;
	
	public OverDraftLimitExceededException(double balance, double overdraft) {
		this.balance = balance;
		this.overdraft = overdraft;
		double amount = balance + overdraft;
		this.message = "Only " + amount + " funds is available!";
	}
	
	public String getMessage() {
		return this.message;
	}
	
	public String toString() {
		return "OverdraftLimitExceededException: " + this.getMessage();
	}
}
